#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll fact[25], a[25];

ll lcm(ll a, ll b) { return a / __gcd(a, b) * b; }
int main() {
  ll n, m, y;
  cin >> n >> m >> y;
  for (int i = 0; i < n; i++)
    cin >> a[i];
  ll ans = 0;
  fact[0] = 1;
  for (int i = 1; i <= 20; i++)
    fact[i] = i * fact[i - 1];  

  for (int i = 0; i < (1 << n); i++) {
    int k = __builtin_popcount(i); // 求出i的二进制里 1的个数
    if (k < m)
      continue;

    ll l = 1; // 最小公倍数
    for (int j = 0; j < n; j++) {
      if ((1 << j) & i) {
        l = lcm(l, a[j]);
        if (l % a[j] != 0 || l <= 0) { // 如果爆ll了，则该方案一定不行
          l = 9e18;
          break;
        }
      }
    }
    if (l == 9e18)
      continue;
      
    int base = fact[k] / fact[m] / fact[k - m];

    
    // cout << k << ' ' << base * (y / l) << endl;
    if (k % 2 != m % 2)
      base *= -1;
    ans += base * (y / l);
  }
  cout << ans;
}
